import React from 'react'
import { render } from 'react-dom'
import { Router, browserHistory } from 'react-router'
import { syncHistoryWithStore } from 'react-router-redux'
import { Provider } from 'react-redux'
import  configureStore from '../store/configureStore'
import routes from '../routes/index'

// import 'babel-polyfill'
import '../css/normalize.css'
import 'react-weui/lib/react-weui.min.css'
import '../css/iconfont.css'
import '../css/style.css'
import 'weui'
import 'slick-carousel/slick/slick.css'
import 'slick-carousel/slick/slick-theme.css'
import 'whatwg-fetch'

const store = configureStore();
const history = syncHistoryWithStore(browserHistory, store);

class Root extends React.Component {
	render() {
		return (
		    <Provider store={store}>
                <Router history={history} routes={routes} />
            </Provider>
		);
	}

}

render(<Root />, document.getElementById('root'));
